<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=windows-1250">
    <title></title>
  </head>
  <body>
  
  <?php
  
  	require 'class/database.class.php';
  
    $datenbank_dings=new Database();
    $abfrage = $datenbank_dings->sendQuery("SELECT Mail FROM user WHERE Mail='".$_POST["benutzername"]."' AND Passwort='".md5($_POST["passwort"])."';");
  
    if($abfrage->fetch_array()){
      
      session_start();
      $_SESSION["benutzername"]=$_POST["benutzername"];
      
      header("Location: index.php");
    } else {
      header("Location: login.php?versuch=true");
    }
  
  ?>

  </body>
</html>